-
-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show basename in source: split line #1017
Conversation
before this change I would get a split with... `────────────────────────── source:/server/externa[...].cpp+130 ────` which does not tell me anything about what file I am in. now I get something like this... `─────────────── source:/server/externa[...]SendReceive.hpp+110 ────`
🤖 Coverage Update
To this point, this PR:
|
Looks good, but why the switch from 20 chars to 30? I wish we had comments about where that came from in the first place. Looks like the old code could have made a long line if the extension was long as well. Overall this lgtm. |
I don't see myself ever debugging in a terminal that's less than 80 columns, and I would prefer to see more of the file name if it's long. I could switch it back to 20 if it's a problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change, otherwise LGTM
🤖 Coverage Update
To this point, this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thank you for your review. the CI is failing with I think both are setup issues, and not related to my change. Is there anything I need to do to finish this PR? |
Yup I saw the failures, it's not on your end. I'll be looking into that |
This patch modifies the text shown above the source window as part of the
context_source()
function.I'm working on a complex C++ project, with many directories and files.
Before this change I would get a split with...
────────────────────────── source:/server/externa[...].cpp+130 ────
which does not tell me anything about what file I am in, other than its extension.
After the change, I get something like this:
─────────────── source:/server/externa[...]SendReceive.hpp+110 ────
Depending on the length of the path the following may be shown:
if len(fn) <= 30
elif len(basename(fn)) < 20
<first 15 chars>[...]<basename>
<first 15 chars>[...]<last 10 chars>